<?php

/**
 * Turma form.
 *
 * @package    form
 * @subpackage Turma
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class TurmaForm extends BaseTurmaForm
{
  	public function configure()
  	{
  		parent::configure();
  		unset($this->widgetSchema['created_at']);
  		unset($this->widgetSchema['updated_at']);
  		unset($this->validatorSchema['created_at']);
 		unset($this->validatorSchema['updated_at']);
  		
  		$options = array('A'=>'Ativa', 'N'=>'Inativa');
  		
		$this->widgetSchema['st_turma'] = new sfWidgetFormChoice(
			array('choices'=>$options, 'expanded'=>true, 'multiple'=>false)
		);
		
		$this->setDefault('st_turma', 'A');
  		
  		$this->widgetSchema['nm_turma'] = new sfWidgetFormInput(
  			array(),
  			array('size' => '50', 'class'=>"{required:true, messages:{required:'O campo Nome é obrigatório.'}}")
  		);
  		
  		$this->widgetSchema['nu_turma'] = new sfWidgetFormInput(
  			array(),
  			array('class'=>"number {required:true, messages:{required:'O campo Número é obrigatório.'}}")
  		);
  		
  		$this->widgetSchema->setLabels(array(
  		      	'id_turma'     => 'ID#',
		      	'nm_turma'     => 'Nome',
		      	'nu_turma'     => 'Numero',
		      	'ds_turma'     => 'Descrição',
  				'st_turma'	   => 'Situação',
		      	'slug'         => 'Slug',
		      	'created_at'   => 'Criada em',
		      	'updated_at'   => 'Atualizada em',
		));
  	}
}